#include <experimental/simd>
#include <array>

using Vec3D = std::array<float, 3>;
float scalar_product1(const Vec3D &a, const Vec3D &b)
{
    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}

using std::experimental::native_simd;
using Vec3DSimd = std::array<native_simd<float>, 3>;
native_simd<float> scalar_product2(const Vec3DSimd&  a, const Vec3DSimd& b) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}

int main()
{
    Vec3D v31={1.0f,2.0f,3.0f};
    Vec3D v32={1.0f,2.0f,3.0f};

    auto r1=scalar_product1(v31,v32);

    
    Vec3DSimd v33={1.0f,2.0f,3.0f};
    Vec3DSimd v34={1.0f,2.0f,3.0f};
    auto r2=scalar_product2(v33,v34);
    return 0;
}